package ocn_psn.ocnpsn;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;

/**
 * Created by Olivier on 08/02/2015.
 */
public class OptionActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_option);

        Button btnStart = (Button)findViewById(R.id.btnStart);
        btnStart.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CheckBox nightBox = (CheckBox) findViewById(R.id.nightBox);
                CheckBox autoBox = (CheckBox) findViewById(R.id.autoBox);
                CheckBox cheatBox = (CheckBox) findViewById(R.id.cheatBox);

                Intent intent = new Intent(OptionActivity.this, GameActivity.class);
                intent.putExtra("nightMode", nightBox.isChecked());
                intent.putExtra("autoMode", autoBox.isChecked());
                intent.putExtra("cheatMode", cheatBox.isChecked());
                startActivity(intent);
            }
        });
    }
}
